package com.jixiaotian.spring.annotation.demo.annotation.configuration;

import com.jixiaotian.spring.annotation.project.entity.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: jixiaotian.ch@qq.com
 * @Date : 2020/9/10
 */
@Configuration
public class MyConfiguration {

    //默认是类名首字母小写
    //其次是取方法名
    //优先取@Bean注解的value

    @Bean("person2")
    public Person person() {
        return new Person("JJ",18);

    }

}
